/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chatclient.applets.note;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.logging.Level;
import java.util.logging.Logger;
import chatclient.tools.NoteContainer;
import java.awt.*;

/**
 *
 * @author Adam
 */
public class LinkPart implements NotePart {
    String url;
    
    
    public LinkPart(String anUrl) {
        
        this.url = anUrl;
        
    }

    @Override
    public int getWidth() {
        return 0; //url.getWidth(observer);
    }

    @Override
    public int getAscent() {
        return 0; //image.getHeight(observer);
    }

    @Override
    public void paint(NoteContainer notecontainer, Note note, Graphics g, int i, int j, String s, Color color,
            Double double1) {
        
        //g.drawImage(image, i, j, observer);
    }
     
    @Override
    public String toString() {
        return "<link>";
    }

    @Override
    public boolean isWhiteSpace() {
        return false;
    }

    @Override
    public boolean hasEol() {
        return false;
    }

    @Override
    public NotePart breakAtWidth(int i, boolean flag, LinePart linepart) {
        if (flag) {
            linepart.add(this, true);
            return null;
        } else {
            return this;
        }
    }

    @Override
    public int getDescent() {
        return 0;
    }

    @Override
    public int getHeight() {
        return getLeading() + getAscent() + getDescent();
    }

    @Override
    public int getLeading() {
        return 0;
    }

    @Override
    public int getMaxAscent() {
        return getAscent();
    }

    @Override
    public int getMaxDescent() {
        return getDescent();
    }
}
